from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token

urlpatterns = [
    #/users/usernames/(?P<username>\w{5,20})/count/
    url(r'^usernames/(?P<username>\w{5,20})/count/$',views.RegisterUsername.as_view(),name='usernamecount'),
    url(r'^phones/(?P<mobile>1[345789]\d{9})/count/$', views.RegisterPhoneCountAPIView.as_view(), name='phonecount'),
    url(r'^$',views.RegisterCreateUserView.as_view()),
    url(r'^auths/$', obtain_jwt_token),
    url(r'^infos/$',views.UserCenterINfoVIew.as_view()),
    url(r'^emails/$',views.UserUpdateEmailView.as_view()),
    url(r'^emails/verification/$',views.UserEmailActiveView.as_view()),
    # url(r'^addresses',views.ListAddressView.as_view()),
    url(r'^addresses/$',views.AddressView.as_view()),
    url(r'^delete/(?P<pk>\d+)/$',views.DelAddressView.as_view()),
]